import {doCustomTimes} from "@/libs/utils"; 
import Mock from 'mockjs';
const Random = Mock.Random;


export const departmentList = {
	data:["田湾静机一部","田湾静机二部","田湾仪控部","田湾电气一部","田湾电气二部"],
	success: "true",
	msg: null
}

export const noticeList = (req) =>{
	console.log(req);
	let noticeList = [];
	doCustomTimes(10,()=>{
        noticeList.push(Mock.mock({
			id:Random.increment(6),
			"KKScode|1":["1KBF22CP001","1MAX51AE001","1KLE40AH013-M01","1BTG21","1KTT10AA108-M01"],
			"description|1":["检查维护(1M)","四年大修(4Y)","定期标定","11UCB厂房27米电梯右侧1GKC管道上有砂眼喷水",""],
			leader:"@cname"
		}));		
	})
	return {
		data:noticeList,
		success: "true",
		msg: null
	}	
}


export const orderInfo = (req) =>{
	console.log(req);
	let noticeList = [];
	doCustomTimes(10,()=>{
        noticeList.push(Mock.mock({
			id:Random.increment(),
			"KKScode|1":["1KBF22CP001","1MAX51AE001","1KLE40AH013-M01","1BTG21","1KTT10AA108-M01"],
            "description|1":["检查维护(1M)","四年大修(4Y)","定期标定","11UCB厂房27米电梯右侧1GKC管道上有砂眼喷水",""],
			"progress|1":["西门子分析可能原因为顺控开主汽门脉冲时间偏小。","需要进行解体大修。",""],
			leader:"@cname",
            deadLine:"@date"
		}));		
	})

	let orderInfo = Mock.mock({
		"packageState|1":["未完成,已完成,进行中"],
		beginTime:"@date",
		finishTime: "@date",
		deadLine:"@date",
		remark: "备注",
		noticeList:noticeList
	})
	return {
		data:orderInfo,
		success: "true",
		msg: null
	}
}

